-- GENERATED SPELL FOR [Amani'shi Flame Caster] --


function spell0_23596(pUnit, Event) --@Conflagration,n/a--
pUnit:FullCastSpellOnTarget(42220,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23596', 5338, 1)
end

function spell1_23596(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(43245,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23596', 561, 1)
end

function spell2_23596(pUnit, Event) --@Fireball Volley,n/a--
pUnit:FullCastSpellOnTarget(43240,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23596', 1500, 1)
end

function spell3_23596(pUnit, Event) --@Haste,Self--
pUnit:FullCastSpellOnTarget(43242,pUnit)
pUnit:RegisterEvent('Sorts_23596', 30259, 1)
end

function Sorts_23596(pUnit, Event)
local choix_sorts_23596 = math.random(0, 3)
if choix_sorts_23596 == 0 then
pUnit:RegisterEvent('spell0_23596', 1, 1)
end
if choix_sorts_23596 == 1 then
pUnit:RegisterEvent('spell1_23596', 1, 1)
end
if choix_sorts_23596 == 2 then
pUnit:RegisterEvent('spell2_23596', 1, 1)
end
if choix_sorts_23596 == 3 then
pUnit:RegisterEvent('spell3_23596', 1, 1)
end
end

function mob23596_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23596', math.random(1500, 3000), 1)
end

function mob23596_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23596_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23596_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23596, 1, 'mob23596_Action')
RegisterUnitEvent(23596, 2, 'mob23596_Leave')
RegisterUnitEvent(23596, 3, 'mob23596_Kill')
RegisterUnitEvent(23596, 4, 'mob23596_Die')
